﻿@namespace MudBlazor
@inherits MudComponentBase
@using MudBlazor.Internal

<MudInputControl Label="@Label" HelperText="@HelperText" Variant="@Variant" FullWidth="@FullWidth" Margin="@Margin" Disabled="@Disabled"
                 Class="@InputControlClassname" Error="@Error" ErrorText="@ErrorText" Style="@Style" @attributes="UserAttributes" ForId="@FieldId">
    <InputContent>
        <div class="@Classname">
            @if (Adornment == Adornment.Start)
            {
                <MudInputAdornment Class="@AdornmentClassname"
                                   Icon="@AdornmentIcon"
                                   Color="@AdornmentColor"
                                   Size="@IconSize"
                                   Text="@AdornmentText"
                                   Placement="@Adornment.Start"
                                   AdornmentClick="@OnAdornmentClick" />
            }
            <div class="@InnerClassname">
                @ChildContent
            </div>
            @if (Adornment == Adornment.End)
            {
                <MudInputAdornment Class="@AdornmentClassname"
                                   Icon="@AdornmentIcon"
                                   Color="@AdornmentColor"
                                   Size="@IconSize"
                                   Text="@AdornmentText"
                                   Placement="@Adornment.End"
                                   AdornmentClick="@OnAdornmentClick" />
            }
            @if (Variant == Variant.Outlined)
            {
                <div class="mud-input-outlined-border"></div>
            }
        </div>
    </InputContent>
</MudInputControl>